package net.huashitong.ssydt.exam.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import net.huashitong.ssydt.exam.constant.ExamConsts;
import net.huashitong.ssydt.exam.entity.SsExamPaper;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author <a href="mailto:yhy23456@163.com">huiyang.yu</a>
 * @since 2017.09.04
 */
@ApiModel(value = "PaperList", description = "试卷列表")
public class PaperListOutVO implements Serializable {

    private static final long serialVersionUID = 4766289125079940465L;
    @ApiModelProperty("试卷id,lastId")
    private Long paperId;//试卷id,lastId
    @ApiModelProperty("试卷名称")
    private String paperName;//试卷名称
    @ApiModelProperty("试卷类型")
    private String paperType;//试卷类型
    @ApiModelProperty("题目数")
    private Integer questionNumber;//题目数
    @ApiModelProperty("作答人数(次数)")
    private Long testNumber;//作答人数(次数)
    @ApiModelProperty("试卷记录id")
    private Long paperRecordId;//试卷记录id
    @ApiModelProperty("练习状态 01 进行中 02已完成 03未作答")
    private String testState;//练习状态
    @ApiModelProperty("完成题数")
    private Integer finishNumber;//完成题数
    @ApiModelProperty("创建时间")
    private Date gmtCreate;//创建时间
    @ApiModelProperty("正确率")
    private BigDecimal correctRate = BigDecimal.valueOf(0);//正确率

    public PaperListOutVO(SsExamPaper ssExamPaper) {
        this.paperId = ssExamPaper.getId();
        this.paperName = ssExamPaper.getPaperName();
        this.paperType = ssExamPaper.getPaperType();
        this.questionNumber = ssExamPaper.getQuestionNumber();
        this.testNumber = ssExamPaper.getTestNumber();
        this.paperRecordId = 0L;
        this.testState = ExamConsts.TestState.NOT_RECORD;
        this.finishNumber = 0;
        this.gmtCreate = ssExamPaper.getGmtCreate();
    }

    public Long getPaperId() {
        return paperId;
    }

    public void setPaperId(Long paperId) {
        this.paperId = paperId;
    }

    public String getPaperName() {
        return paperName;
    }

    public void setPaperName(String paperName) {
        this.paperName = paperName;
    }

    public String getPaperType() {
        return paperType;
    }

    public void setPaperType(String paperType) {
        this.paperType = paperType;
    }

    public Integer getQuestionNumber() {
        return questionNumber;
    }

    public void setQuestionNumber(Integer questionNumber) {
        this.questionNumber = questionNumber;
    }

    public Long getTestNumber() {
        return testNumber;
    }

    public void setTestNumber(Long testNumber) {
        this.testNumber = testNumber;
    }

    public Long getPaperRecordId() {
        return paperRecordId;
    }

    public void setPaperRecordId(Long paperRecordId) {
        this.paperRecordId = paperRecordId;
    }

    public String getTestState() {
        return testState;
    }

    public void setTestState(String testState) {
        this.testState = testState;
    }

    public Integer getFinishNumber() {
        return finishNumber;
    }

    public void setFinishNumber(Integer finishNumber) {
        this.finishNumber = finishNumber;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public BigDecimal getCorrectRate() {
        return correctRate;
    }

    public void setCorrectRate(BigDecimal correctRate) {
        this.correctRate = correctRate;
    }
}
